<!--
*Author：jxx
 *Contact：283591387@qq.com
 *代码由框架生成,任何更改都可能导致被代码生成器覆盖
 *业务请在@/extension/demo/outputinvoicemanage/OutputInvoiceManage.jsx此处编写
 -->
<template>
    <view-grid ref="grid" :columns="columns" :detail="detail" :editFormFields="editFormFields"
        :editFormOptions="editFormOptions" :searchFormFields="searchFormFields" :searchFormOptions="searchFormOptions"
        :table="table" :extend="extend">
    </view-grid>
</template>
<script>
import extend from "@/extension/demo/outputinvoicemanage/OutputInvoiceManage.jsx";
import { ref, defineComponent } from "vue";
export default defineComponent({
    setup() {
        const table = ref({
            key: 'OutputInvoiceId',
            footer: "Foots",
            cnName: '销项发票管理表',
            name: 'outputinvoicemanage/OutputInvoiceManage',
            url: "/setpath/api/OutputInvoiceManage/",
            sortName: "CreateTime"
        });
        const editFormFields = ref({ "OutputInvoiceName": "", "OutputInvoiceType": "", "OutputInvoiceMoney": "", "OutputInvoiceTaxRate": "", "OutputInvoiceTaxDifference": "", "OutputInvoiceDate": "", "OutputInvoiceRemark": "" });
        const editFormOptions = ref([[{ "title": "客户名称", "required": true, "field": "OutputInvoiceName", "type": "text" }],
        [{ "dataKey": "发票下拉框", "data": [], "title": "发票类型", "required": true, "field": "OutputInvoiceType", "type": "radio" }],
        [{ "title": "发票金额", "required": true, "field": "OutputInvoiceMoney", "type": "decimal" }],
        [{ "title": "税率", "required": true, "field": "OutputInvoiceTaxRate", "type": "decimal" }],
        [{ "title": "税额", "required": true, "field": "OutputInvoiceTaxDifference", "type": "decimal" }],
        [{ "title": "开票日期", "required": true, "field": "OutputInvoiceDate", "type": "datetime" }],
        [{ "title": "备注", "required": true, "field": "OutputInvoiceRemark", "type": "textarea" }]]);
        const searchFormFields = ref({ "OutputInvoiceName": "", "OutputInvoiceType": "", "OutputInvoiceDate": "" });
        const searchFormOptions = ref([[{ "title": "客户名称", "field": "OutputInvoiceName", "type": "text" }, { "dataKey": "发票下拉框", "data": [], "title": "发票类型", "field": "OutputInvoiceType", "type": "decimal" }, { "title": "开票日期", "field": "OutputInvoiceDate", "type": "datetime" }]]);
        const columns = ref([{ field: 'OutputInvoiceId', title: '主键ID', type: 'string', width: 110, hidden: true, readonly: true, require: true, align: 'left' },
        { field: 'OutputInvoiceNumber', title: '发票号', type: 'string', width: 220, align: 'left', sort: true },
        { field: 'OutputInvoiceName', title: '客户名称', type: 'string', width: 220, require: true, align: 'left' },
        { field: 'OutputInvoiceType', title: '发票类型', type: 'int', bind: { key: '发票下拉框', data: [] }, width: 110, require: true, align: 'left' },
        { field: 'OutputInvoiceMoney', title: '发票金额', type: 'decimal', width: 110, require: true, align: 'left' },
        { field: 'OutputInvoiceTaxRate', title: '税率', type: 'decimal', width: 110, require: true, align: 'left' },
        { field: 'OutputInvoiceTaxDifference', title: '税额', type: 'decimal', width: 110, require: true, align: 'left' },
        { field: 'OutputInvoiceDate', title: '开票日期', type: 'datetime', width: 150, require: true, align: 'left', sort: true },
        { field: 'OutputInvoiceRemark', title: '备注', type: 'string', width: 220, require: true, align: 'left' },
        { field: 'OutputInvoicePreparedBy', title: '制单人', type: 'int', width: 110, align: 'left' },
        { field: 'CreateName', title: '创建人', type: 'string', width: 220, align: 'left' },
        { field: 'CreateTime', title: '创建时间', type: 'datetime', width: 150, align: 'left', sort: true },
        { field: 'UpdateName', title: '修改人', type: 'string', width: 220, align: 'left' },
        { field: 'UpdateTime', title: '修改时间', type: 'datetime', width: 150, align: 'left', sort: true },
        { field: 'IsDel', title: '逻辑删除', type: 'int', width: 110, hidden: true, align: 'left' }]);
        const detail = ref({
            cnName: "#detailCnName",
            table: "#detailTable",
            columns: [],
            sortName: "",
            key: ""
        });
        return {
            table,
            extend,
            editFormFields,
            editFormOptions,
            searchFormFields,
            searchFormOptions,
            columns,
            detail,
        };
    },
});
</script>
